﻿@inherits  Project.Module.View.CMS.CMSSearchSupplierView
@{
    ViewBag.Title = "Tìm kiếm nhà cung cấp";
    Layout = "~/Views/Backend/Home/_Master.cshtml";
}
<h2>Tìm kiếm nhà cung cấp</h2>
<form method="post" action="/admin/admin-nha-cung-cap">
   <div>
   <table border="0">
        	<tr>
            	<td>Nhà cung cấp</td>
            	<td> <input type="text" value="" name="keywordSupplier" /></td>
            </tr>
            <tr height="10px"></tr>
            <tr>
            	<td>Địa chỉ&nbsp;&nbsp;</td>
            	<td><input type="text" value="" name="keywordAddress" /></td>
            </tr>
            <tr height="10px"></tr>
            <tr>
            	<td>Mô tả&nbsp;&nbsp;</td>
            	<td><input type="text" value="" name="keywordDesc" /></td>
            </tr>
            <tr height="10px"></tr>
            <tr>
            	<td><input type="submit" value="" class="search-form" /></td>&nbsp;&nbsp;
            </tr>
   </table>
   </div>
</form>
<table height="20px"></table>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    @if (this.listSupplier != null && this.listSupplier.Count > 0)
    { 
        <tr>
        <th class="table-header-repeat line-left "><a>Tên nhà cung cấp</a></th>
        <th class="table-header-repeat line-left "><a>Địa chỉ</a></th>
        <th class="table-header-repeat line-left"><a>Mô tả</a></th>
        <th class="table-header-repeat line-left"><a>Chỉnh sửa</a></th>
        <th class="table-header-repeat line-left"><a>Xóa</a></th>
        </tr>
        foreach (var item in this.listSupplier)
        { 
            <tr>
            <td>@item.SupplierName</td>
            <td>@item.address</td>
            <td>@item.description</td>
            <td><a href="/admin/quan-ly-nha-cung-cap/edit?id=@item.SupplierID">Chỉnh sửa</a></td>
            <td><a href="/admin/quan-ly-nha-cung-cap/del?id=@item.SupplierID">Xóa</a></td>
            </tr>
        }
    }
</table>
<table height="20px"></table>
<input type="button" value="" class="add-form" onclick="addProduct()" />

<script type="text/jscript">
    function addProduct() {
        window.location.href = "/admin/them-nha-cung-cap";
    }
</script>
